package cn.com.simple.learning.core.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Jianxing.Jia
 * @date 2022/2/8
 * @description 描述信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {

    private String id;

    private int age;

    private String name;

    private String nickname;

    public static User from(int age, String name, String nickname) {
        User user = new User();
        user.age = age;
        user.name = name;
        user.nickname = nickname;
        return user;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", age=" + age +
                ", name='" + name + '\'' +
                ", nickname='" + nickname + '\'' +
                '}';
    }
}
